﻿namespace KinonekoSoftware.CodariaDB.Documents.Theories.Rarities
{
    [Notion]
    [Glossary]
    public class Rarity : TheoryObject, IComparable<Rarity>
    {
        private string _foreground;
        private string _background;
        private string _icon;
        private string _image;
        private string _stroke;
        private int    _level;
        
        public string Stroke
        {
            get => _stroke;
            set => SetValue(ref _stroke, value);
        }

        public string Image
        {
            get => _image;
            set => SetValue(ref _image, value);
        }
        public string Icon
        {
            get => _icon;
            set => SetValue(ref _icon, value);
        }

        public int Level
        {
            get => _level;
            set => SetValue(ref _level, value);
        }
        
        public string Background
        {
            get => _background;
            set => SetValue(ref _background, value);
        }
        
        public string Foreground
        {
            get => _foreground;
            set => SetValue(ref _foreground, value);
        }
        
        public int CompareTo(Rarity other)
        {
            if (ReferenceEquals(this, other)) return 0;
            if (ReferenceEquals(null, other)) return 1;
            return _level.CompareTo(other._level);
        }
    }
}